import vhttp from './modle/vueRequest';
import config from '@/config.js';

/* API接口 */
/**
 * vhttp(url,params,httpType,method)
 * @url APIurl的地址。
 * @params 请求的参数。
 * @httpType 请求的类型 GET POST。
 * @method 请求方法 ajax（jsonp) 或者 axios 默认axios。
 * @return Promise;
 * 规范 ： 命名前缀需要 type_*  get_baidu  post_baidu。接口地址需要添加注释.
 */

/* 请求URL地址 */
const URLWEBHTTP = config.URLWEBHTTP;
// const a = config.a;

export const isApplyProject = params => vhttp('/index/company/isApplyProject.html', params, 'GET');//检测企业是否申报过项目接口
export const companyRegister = params => vhttp('/index/login/companyRegister.html', params, 'POST');//企业用户注册接口
export const comModifyPwd = params => vhttp('/index/company/modifyPwd.html', params, 'PUT');//企业修改密码接口
export const informationList = params => vhttp('/open/information/informationList.html', params, 'GET', 'ajax');//资讯列表接口
export const noticeList = params => vhttp('/open/information/noticeList.html', params, 'GET', 'ajax');//通知公告列表接口
export const informationDetail = params => vhttp('/open/information/informationDetail.html', params, 'GET', 'ajax');//咨询快报详情接口
export const noticeDetail = params => vhttp('/open/information/noticeDetail.html', params, 'GET', 'ajax');//通知公告详情接口
export const downloadProjectFile = params => vhttp('/index/project/downloadProjectFile.html', params, 'GET');//下载项目申报材料接口
export const downloadCompanyApplyFile = params => vhttp('/index/project/downloadCompanyApplyFile.html', params, 'GET');//下载企业上报材料接口


export const countyList = params => vhttp('/index/area/countyList.html', params, 'GET');//区县列表接口
export const townList = params => vhttp('/index/area/townList.html', params, 'GET');//乡镇列表接口
export const registerTypeList = params => vhttp('/index/type/registerTypeList.html', params, 'GET');//企业注册类型列表接口
export const rootList = params => vhttp('/index/classification/rootList.html', params, 'GET');//顶级企业行业分类列表接口
export const subList = params => vhttp('/index/classification/subList.html', params, 'GET');//子级企业行业分类列表接口
export const edit = params => vhttp('/index/company/edit.html', params, 'PUT');//编辑已登录企业信息接口
export const info = params => vhttp('/index/company/info.html', params, 'GET');//获取已登录企业信息接口
export const projectList = params => vhttp('/index/project/projectList.html', params, 'GET');//申报项目列表接口
export const projectInfo = params => vhttp('/index/project/info.html', params, 'GET');//申报项目详情接口
export const companyApplyProjects = params => vhttp('/index/project/companyApplyProjects.html', params, 'GET');//企业申报项目记录接口
export const applyFileUpLoad = params => vhttp('/index/project/applyFileUpLoad.html', params, 'POST');//申报材料上传接口
export const companyList = params => vhttp('/index/company/companyList.html', params, 'GET');//企业库列表接口
export const comResetPwd = params => vhttp('/index/company/resetPwd.html', params, 'PUT');//企业库重置企业登录密码接口
export const comDisabled = params => vhttp('/index/company/disabled.html', params, 'PUT');//设置企业禁用状态接口

export const projectApplyCompanys = params => vhttp('/index/project/projectApplyCompanys.html', params, 'GET');//项目申报企业表接口
export const sysProjectList = params => vhttp('/index/project/projects.html', params, 'GET');//项目库列表接口
export const projectEdit = params => vhttp('/index/project/projectEdit.html', params, 'PUT');//项目编辑接口
export const reapplyFileUpLoad = params => vhttp('/index/project/reapplyFileUpLoad.html', params, 'PUT');//企业重新上传申报材料接口
export const projectDel = params => vhttp('/index/project/projectDel.html', params, 'PUT');//项目删除接口
export const projectAdd = params => vhttp('/index/project/projectAdd.html', params, 'POST');//项目新增接口
export const applyApproval = params => vhttp('/index/project/applyApproval.html', params, 'PUT');//项目申报审批接口
export const infoByCompanyId = params => vhttp('/index/company/infoByCompanyId.html', params, 'GET');//通过企业 ID 获取企业信息接口
export const editByCompanyId = params => vhttp('/index/company/editByCompanyId.html', params, 'PUT');//通过企业 ID 获取企业信息接口
export const applyProjectsByCompanyId = params => vhttp('/index/project/applyProjectsByCompanyId.html', params, 'GET');//通过企业 ID 获取申请项目接口



export const Login = params => vhttp('/index/login/login.html', params, 'GET');//用户登录接口
export const imageCode = params => vhttp('/index/login/imageCode.html', params, 'GET');//图形验证码接口
export const getList = params => vhttp('/index/Menu/getList.html', params, 'GET');//图形验证码接口
export const logout = params => vhttp('/index/login/logout.html', params, 'GET');//用户登出接口
export const adminList = params => vhttp('/index/admin/adminList.html', params, 'GET');//管理员用户列表接口
export const infoByAdminId = params => vhttp('/index/admin/infoByAdminId.html', params, 'GET');//通过用户 ID 获取用户详情接口
export const adminEdit = params => vhttp('/index/admin/adminEdit.html', params, 'PUT');//通过用户 ID 获取用户详情接口
export const adminDisabled = params => vhttp('/index/admin/disabled.html', params, 'PUT');//设置管理员用户禁用状态接口
export const adminAdd = params => vhttp('/index/admin/adminAdd.html', params, 'POST');//新增管理员用户接口
export const modifyPwd = params => vhttp('/index/admin/modifyPwd.html', params, 'PUT');//管理员修改密码接口
export const resetPwd = params => vhttp('/index/admin/resetPwd.html', params, 'PUT');//管理员修改密码接口
